 /*	
 *				
 *					ISNW ---- It is a war.It is not warcraft!
 *
 *
 *					Author:					zhoukeli(haxixi_keli)
 *					Filename:				MeshBuffer.h
 *					CreateTime:				2008/12/20
 *					ModifyTime:				2008/12/20
 *
 */

#ifndef __ISNW_MESH_BUFFER_H__
#define __ISNW_MESH_BUFFER_H__

#include "include/IMeshBuffer.h"
#include "include/isnwMaterial.h"
#include "include/isnwVertex.h"
#include "include/isnwArray.h"
#include "include/aabbox3d.h"
#include "include/isnwArray.h"

namespace ISNW
{
namespace scene
{
	class MeshBuffer : public IMeshBuffer
	{
	public:
		//! a buffer has a material
		video::material			m_material;

		//! vertex buffer & indices buffer
		core::array<video::vertex>				vertex_buffer;

		core::array<u16>	indices_buffer;

		core::array<u16>	indices16_buffer;

		//! axis-aligned-bound-box
		core::aabbox3df		box;

	public:
		core::array<u16>& getIndices16();
	};

	class MeshBuffer2TCoords : public IMeshBuffer
	{
	public:
		//! a buffer has a material
		video::material			m_material;

		//! vertex buffer & indices buffer
		core::array<video::vertex2tcoords>		vertex_buffer;

		core::array<u16>			indices_buffer;

		//! axis-aligned-bound-box
		core::aabbox3df			box;
	};
} // end namespace scene
} // end namespace ISNW
#endif